package cn.com.sd.log.model;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Proxy;

@Entity
@Table(name="sys_log")
@Proxy(lazy = false)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SystemLog implements java.io.Serializable {

	private static final long serialVersionUID = -4348225721215562830L;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;
	
	/*时间*/
	@Column(name = "datetime")
	private Long datetime;
	
	/*日志级别*/
	@Column(name = "log_level")
	private String logLevel;
	
	/* 日志名称*/
	@Column(name = "log_name")
	private String logName;
	
	/* 消息*/
	@Column(name = "message")
	private String message;
	
	/*堆栈信息*/
	@Column(name = "throwable")
	private String throwable;

	public SystemLog(){}
	
	public SystemLog(Long datetime, String logName, String message) {
		this.datetime = datetime;
		this.logName = logName;
		this.message = message;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Long getDatetime() {
		return datetime;
	}

	public void setDatetime(Long datetime) {
		this.datetime = datetime;
	}

	public String getLogLevel() {
		return logLevel;
	}

	public void setLogLevel(String logLevel) {
		this.logLevel = logLevel;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getThrowable() {
		return throwable;
	}

	public void setThrowable(String throwable) {
		this.throwable = throwable;
	}
	
	
}
